home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copy_Selection_or_Line.bsh - a BeanShell macro for jEdit
- * which copies either the selected text, or the current line
- * if no text is selected, to the clipboard.
- *
- * Copyright (C) 2003 Ollie Rutherfurd <oliver@jedit.org>
- *
- * $Id: Copy_Selection_or_Line.bsh,v 1.1 2004/08/03 21:31:47 orutherfurd Exp $
- */
-
- copySelectionOrLine(){
- selections = textArea.getSelection();
- if(selections.length == 0){
- textArea.smartHome(false);
- textArea.smartEnd(true);
- }
- Registers.copy(textArea,'$');
- }
-
- copySelectionOrLine();
-
- /*
- Macro index data (in DocBook format)
-
- <listitem>
- <para><filename>Copy_Selection_or_Line.bsh</filename>
- <abstract><para>
- If no text is selected, the current line is copied to
- the clipboard, otherwise the selected text is copied
- to the clipboard.
- </para></abstract>
- </listitem>
-
- */
-